package com.example.demo.service;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.example.demo.entity.User;
import com.example.demo.repository.UserRepository;

@Service
public class UserService {

	@Resource
	private UserRepository userRepository;
	
	
	@Transactional
	public User insert(User user) {
		return userRepository.save(user);
	}
}
